The objective of this lab is to identify and exploit the Apache Struts S2-045 Remote Code Execution (RCE) vulnerability. The assessment demonstrates the process of identifying a vulnerable web application, leveraging a known exploit to achieve remote code execution, and validating the impact of the vulnerability in a controlled environment.
- Web application reconnaissance and service enumeration
- Identifying vulnerable Apache Struts applications
- Understanding the Apache Struts S2-045 (CVE-2017-5638) vulnerability
- Remote Code Execution (RCE) exploitation
- Using Metasploit Framework to exploit known vulnerabilities
- Gaining remote access to a compromised system
- Post-exploitation validation and information gathering
- Assessing the security impact of RCE vulnerabilities
- Documenting exploitation methodology and findings
- Metasploit Framework (msfconsole)
- Kali Linux Terminal
- Searchsploit / Exploit-DB
Clone the lab repository using the following command:
bash:
https://github.com/SamSothavy/Apache-Struts-S2-045-lab.git
After cloning the repository, start the lab environment using Docker.
If the Docker containers start successfully, you should see output similar to the example below:
As we know S2-045 is a critical Remote Code Execution (RCE) vulnerability (CVE-2017-5638) in the Apache Struts2 framework
Apache Struts Jakarta Multipart Parser OGNL Injection is a critical vulnerability where a malicious Content-Type header causes the multipart parser to fail, and the resulting error message is incorrectly evaluated as an OGNL expression. This allows an attacker to execute arbitrary code on the server, leading to full remote compromise.
After configuring all the required options, we try exploit